import Vue from 'vue'
import Router from 'vue-router'
import Home from '@/components/Home'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      name: 'Home',
      component: Home,
      children: [
        { path: '/', component: () => import('@/views/index') },
        { path: '/writearticle', component: () => import('@/views/WriteArticle'), meta: { admin: true } },
        { path: '/about', component: () => import('@/views/about') },
        { path: '/sort', component: () => import('@/views/sort') },
        { path: '/info', component: () => import('@/views/info') }
      ]
    }
  ]
})



